UCF STIG Viewer Logo
Changes are coming to https://stigviewer.com. Take our survey to help us understand your usage and how we can better serve you in the future.
Take Survey

The smb.conf file must use the hosts option to restrict access to Samba.


Overview

Finding ID Version Rule ID IA Controls Severity
V-1030 GEN006220 SV-35107r1_rule ECSC-1 Medium
Description
Samba increases the attack surface of the system and must be restricted to communicate only with systems requiring access.
STIG Date
HP-UX 11.23 Security Technical Implementation Guide 2015-06-12

Details

Check Text ( C-36704r1_chk )
Examine the smb.conf file.
# cat /etc/opt/samba/smb.conf | tr '\011' ' ' | tr -s ' ' | sed -e 's/^[ \t]*//' | grep -v "^#" | egrep "^hosts|^ hosts allow|^hosts deny"

If the hosts option is not present to restrict access to a list of authorized hosts and networks, this is a finding.
Fix Text (F-32079r1_fix)
Edit the smb.conf file and set the hosts option to permit only authorized hosts access Samba. An example might be:
hosts allow = 127.0.0.1 192.168.2.0/24 192.168.3.0/24
hosts deny = 0.0.0.0/0
The above will only allow SMB connections from the localhost and from the two private networks 192.168.2 and 192.168.3. All other connections will be refused as soon as the client sends its first packet.